<?php
/**
 * $Id: home.php 41 2011-06-08 09:53:47Z bordjukov@gmail.com $
 */
function curPageURL() {
 $pageURL = 'http';
 if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
 $pageURL .= "://";
 if ($_SERVER["SERVER_PORT"] != "80") {
  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
 } else {
  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
 }
 $pos = strrpos($pageURL, "/");
 $pageURL = substr($pageURL, 0, $pos + 1);

 return $pageURL;
}
define('HOST', curPageURL().'../..');
?>
<generic>
	<template>
		<VBox backgroundImage="images/back.jpg" width="100%" height="100%" paddingTop="5" paddingBottom="5" paddingLeft="150" paddingRight="150" verticalGap="15">
			<HBox id="viewstack1" paddingRight="5" paddingLeft="5" borderStyle="solid" borderColor="#9b9b9b" cornerRadius="10" verticalAlign="middle" horizontalAlign="left" width="100%" backgroundColor="#000000" backgroundAlpha="0.2" dropShadowColor="0x000000" dropShadowEnabled="true" shadowDirection="top">
				<Image source="images/tnt-logo_wide.png"  click="dispatchEvent(viewstack1, 'home')"/>
				<HBox verticalAlign="middle" horizontalAlign="right" width="100%" height="100%">
					<Button toolTip= "Print" icon="@Embed(source='<?php echo HOST; ?>/images/stickers/print.png')" />
					<Button toolTip= "Refresh" icon="@Embed(source='<?php echo HOST; ?>/images/stickers/refresh.png')" click="dispatchEvent(viewstack1, 'home')"/>
					<Button toolTip= "About us" icon="@Embed(source='<?php echo HOST; ?>/images/stickers/info.png')" click="dispatchEvent(viewstack1, 'info')"/>
					<Button toolTip= "Help" icon="@Embed(source='<?php echo HOST; ?>/images/stickers/help.png')" click="dispatchEvent(viewstack1, 'help')"/>
					<Button toolTip= "Logout" icon="@Embed(source='<?php echo HOST; ?>/images/stickers/logout.png')" click="dispatchEvent(viewstack1, 'login')"/>
				</HBox>
			</HBox>
			<HBox paddingTop="5" paddingRight="5" paddingBottom="5" paddingLeft="5" borderStyle="solid" borderColor="#9b9b9b" cornerRadius="10" verticalAlign="middle" horizontalAlign="left" height="100%" width="100%" backgroundColor="#000000" backgroundAlpha="0.2" dropShadowColor="0x000000" dropShadowEnabled="true" shadowDirection="top">
				<HBox width="100%" height="100%">
					<HBox verticalAlign="top" horizontalAlign="center" 	height="100%" >
							<VBox width="100%" height="100%" horizontalAlign="center" verticalAlign="Middle">
								<Button label="Add Event" width="175" color="#2b333c" borderColor="#8cbf40" themeColor="#8cbf40" click="dispatchEvent(viewstack1, 'addevent')"/>
								<DateChooser /> 
								<Image source="images/iron_maiden_small.jpg"/>
							</VBox>
					</HBox>
					<HBox height="100%" width="100%" backgroundColor="#ffffff" backgroundAlpha="0">
							<?php require_once('center.php'); ?>
					</HBox>
				</HBox>
			</HBox>
			<HBox borderStyle="solid" cornerRadius="10" borderColor="#9b9b9b" verticalAlign="middle" paddingLeft="150" paddingRight="150" horizontalAlign="center" height="30" width="100%" backgroundColor="#000000" backgroundAlpha="0.2" dropShadowColor="0x000000" dropShadowEnabled="true" shadowDirection="center">
					<Label text="Copyright &#169; Ch51 Team"/>
			</HBox>
		</VBox>
	</template>
	<commands>
		<removeAll/>
	</commands>
</generic>
